import { Component, Input, OnInit } from '@angular/core';
import { ThreadsService } from 'src/app/services/threads.service';
import { Observable } from 'rxjs';
import { ThreadsAlbumPictureRecordVo } from 'src/app/model/threads-album-picture-record-vo';
@Component({
  selector: 'app-threads-albume-item-embed',
  templateUrl: './threads-albume-item-embed.component.html',
  styles: [``]
})
export class ThreadsAlbumeItemEmbedComponent implements OnInit {
  @Input('album')
  public threadsAlbumId!: number;
  public pictures$!: Observable<ThreadsAlbumPictureRecordVo[]>
  public defPicture: string;

  constructor(private threadsService: ThreadsService) {
    this.defPicture = 'assets/img/150x105.png'
  }

  ngOnInit(): void {
    this.pictures$ = this.threadsService.getAlbumPictures(this.threadsAlbumId, 4, '150x105', 'assets/img/150x105.png');
  }

}